// Copyright 2008 Senary
// See credits.txt for details.

// This file is part of Omega VII.

// Omega VII is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Omega VII is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Omega VII.  If not, see <http://www.gnu.org/licenses/>.

#pragma once

#include <set>

class Planet;
class Spaceship;
class SpaceObject;

class Player
{
private:
	std::string _name;
	int _income;
	bool isHumanPlayer;
	float _upkeep;
	
	std::set<Planet*> _planets;
	std::set<Spaceship*> _spaceships;
public:
	Player(void);
	~Player(void);

	void addPlanet(Planet* p);
	void addSpaceship(Spaceship* s);
	void removePlanet(Planet* p);
	void removeSpaceship(Spaceship* s);

	std::set<Planet*> const& getPlanets() const;
	std::set<Spaceship*> const& getSpaceships() const;
	int getIncome();
	void setIncome(int income);

	std::string const& getName() const;
	void setName(std::string const& name);

	void setIsHumanPlayer(bool value);
	bool getIsHumanPlayer();


	//update, called by engine for each frame
	virtual void update(float timestep, float totalTime);
	bool isEnemy(SpaceObject * so) const;

	float getUpkeep();
	void setUpkeep(float upkeep);
};
